// JavaScript Document

	
	/*
	* @ary 주소를 담은 배열.
	*
	*/
	var ImageMultiLoader = function( ary, completeHandler ){
		
		var i, len, img, totalNum, imgList;
		i=0;
		len = ary.length;
		totalNum = 0;
		imgList = [];
		
		var onImgLoadHandler = function()
		{
			totalNum++;
			if( totalNum == len )
			{
				if( completeHandler != null ) completeHandler(imgList);
				
				completeHandler = null;
				len = null;
				totalNum = null;
				imgList = [];
			}
		}
		
		
		while( i<len )
		{
			var img = new Image();
			img.onload = onImgLoadHandler;
			img.src = ary[ i ];
			imgList[ i ] = img;
			
			++i;	
		}
		
		
	}